package com.sanyou.mapper;

import com.sanyou.pojo.IndustryData;
import com.sanyou.pojo.vo.DynamicChartVo;
import com.sanyou.pojo.vo.IndustryDataVo;
import com.sanyou.pojo.vo.NeedRepairPlateVo;
import com.sanyou.utils.MyMapper;
import org.apache.ibatis.annotations.Param;

import java.util.Calendar;
import java.util.Date;
import java.util.List;
import java.util.Map;

public interface IndustryDataMapper extends MyMapper<IndustryData> {


    List<IndustryDataVo> getPieChart(@Param("vo") IndustryDataVo industryDataVo);

    List<IndustryDataVo> query(@Param("vo") IndustryDataVo industryDataVo);

    List<IndustryData> queryData(@Param("vo")IndustryDataVo industryDataVo);

    int countData(@Param("vo")IndustryDataVo industryDataVo);

    double getMax(@Param("vo")IndustryDataVo industryDataVo);

    List<IndustryDataVo> getNormalLineChart(@Param("vo")IndustryDataVo industryDataVo);

    DynamicChartVo getHealthCount(String equipNo,
                                        Double healthLimit, Double subHealthLimit, String startTime, String endTime);

    List<IndustryDataVo> getLifeCycleData(List<String> deviceNo, Date startDate, Date endDate);

    List<NeedRepairPlateVo> getNeedRepairPlates(List<String> deviceNo, Date startDate, Date endDate, Double threshold, Integer start, Integer size);

    Integer getFailNumber(Date startTime,Date endTime,String equipNo);

    Integer updateProductNoOfRecord(Date dataTime,String equipNo,String newProductNo);

    Map<String, Long> getDynamicDetectPlate(Date startDate, Date endDate, List<String> deviceNo, Double equipHealthLimit, Double equipSubHealthLimit, Double needRepairThreshold);

}